﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="city.ascx.cs" Inherits="city" %>
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource4" 
    GroupItemCount="3" DataKeyNames="CityID" >
    <EmptyItemTemplate>
        <td runat="server" />
    </EmptyItemTemplate>
    <GroupTemplate>
        <tr ID="itemPlaceholderContainer" runat="server">
            <td ID="itemPlaceholder" runat="server">
            </td>
        </tr>
    </GroupTemplate>
    <ItemTemplate>
        <td runat="server" style="background-color:#151613;" width="210px" heiht="30px" border="0">
            
            
            
                <a href="fleets.aspx?CityID=<%# Eval("CityID") %>" >
                
                <asp:Label ID="CityIDLabel" runat="server" Text='<%# Eval("CityID") %>' CssClass="cityid"/>
                
                <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' CssClass="cityname"/>
           </a> 

            <br />
            <br />
        </td>
    </ItemTemplate>
    <LayoutTemplate>
        <table runat="server" border="0">
            <tr runat="server">
                <td runat="server">
                    <table ID="groupPlaceholderContainer" runat="server" border="0"  width="630px"
                        style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;font-family: Verdana, Arial, Helvetica, sans-serif;">
                        <tr ID="groupPlaceholder" runat="server">
                        </tr>
                    </table>
                </td>
            </tr>
            <tr runat="server">
                <td runat="server" 
                style="text-align: center;background-color: #151614; 
                font-family: Verdana, Arial, Helvetica, sans-serif;color:#FFF000;
                text-decoration:none;">
                    <asp:DataPager ID="DataPager1" runat="server" PageSize="27">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" 
                                ShowNextPageButton="False" ShowPreviousPageButton="True" FirstPageText="<<<" PreviousPageText="<" />
                            <asp:NumericPagerField NextPageText=">" PreviousPageText="<"/>
                            <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" 
                                ShowNextPageButton="True" ShowPreviousPageButton="False" LastPageText=">>>" NextPageText=">" />
                        </Fields>
                    </asp:DataPager>
                </td>
            </tr>
        </table>
    </LayoutTemplate>
    <SelectedItemTemplate>
        <td runat="server" 
            style="background-color:#FFCC66; font-weight: bold;color: #000080;">
            <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
            <br />
            CityID:
            <asp:Label ID="CityIDLabel" runat="server" Text='<%# Eval("CityID") %>' />
            <br />
        </td>
    </SelectedItemTemplate>
</asp:ListView>

<asp:SqlDataSource ID="SqlDataSource4" runat="server" 
    ConnectionString="<%$ ConnectionStrings:conn %>" 
    SelectCommand="SELECT [Name], [CityID] FROM [City]">
</asp:SqlDataSource>
